package com.monika.main.system.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.monika.main.system.domain.BaseEntity;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * @Author whh
 * @Date: 2023/04/14/ 22:48
 * @description
 */
@TableName("sys_user")
@Getter
@Setter
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**用户ID*/
    @TableId(value = "user_id",type = IdType.AUTO)
    private Long user_id;

    /**部门ID*/
    private Long dept_id;


    /**用户账号*/
    private String user_name;

    /**用户昵称*/
    private String nick_name;

    /**用户类型（00系统用户）*/
    private String user_type;

    /**'用户邮箱'*/
    private String email;

    /**'手机号码'*/
    private String phonenumber;

    /**用户性别（0男 1女 2未知）*/
    private String sex;

    /**头像地址*/
    private String avatar;

    /**'密码'*/
    private String password;

    /**帐号状态（0正常 1停用）*/
    private String status;

    /**删除标志（0代表存在 2代表删除）*/
    private String del_flag;

    /**最后登录IP*/
    private String login_ip;

    /**最后登录时间*/
    private String login_date;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUser_id())
                .append("deptId", getDept_id())
                .append("userName", getUser_name())
                .append("nickName", getNick_name())
                .append("email", getEmail())
                .append("phonenumber", getPhonenumber())
                .append("sex", getSex())
                .append("avatar", getAvatar())
                .append("password", getPassword())
                .append("status", getStatus())
                .append("delFlag", getDel_flag())
                .append("loginIp", getLogin_ip())
                .append("loginDate", getLogin_date())
                .append("createBy", getCreate_by())
                .append("createTime", getCreate_time())
                .append("updateBy", getUpdate_by())
                .append("updateTime", getUpdate_time())
                .append("remark", getRemark())
                .toString();
    }
}
